#pragma once
#ifndef __ANMS_H__
#define __ANMS_H__


#include <opencv2/opencv.hpp>
#include <vector>
using namespace cv;
using namespace std;

void anms(std::vector<KeyPoint> & keypoints, const int k, std::vector<int> &idx, cv::Size imgSize);

class ANMS
{
public:
	ANMS(cv::Size imgSize);
	~ANMS();
	void anms(std::vector<KeyPoint> &keypoints, const int k, std::vector<int> &idx,const cv::Size &imgSize);
private:
	vector<vector<int>> table;
	vector<int> mask, mask2;
	vector<vector<int>> bucket;
	std::vector<std::pair<int, int>> radius;
	int width, height;
};

#endif